#pragma once

#include "JointPositionObj.h"

class Joint
{
public:
	Joint(int maxChildren);
	~Joint(void);

	JointPositionObj * getPosition() {
		return this->position;
	}

	void addChild(Joint * child) {
		if(this->numChildren < this->maxChildren) {
			this->children[this->numChildren] = child;
			this->numChildren++;
		}
	}

	int getNumChildren() {
		return this->numChildren;
	}

	Joint * getChild(int index) {
		if(index < this->numChildren) {
			return this->children[index];
		} else {
			return 0;
		}
	}

	bool isEnabled() {
		return this->enabled;
	}

	void setEnabled(bool enabled) {
		this->enabled = enabled;
	}

	char * getName() {
		return this->name;
	}

	void setName(char * name) {
		this->name = name;
	}

private:
	int maxChildren;
	int numChildren;
	JointPositionObj * position;
	Joint ** children;
	char * name;
	bool enabled;

};
